package top.blackr.folivora.common.security.crud.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import top.blackr.folivora.common.security.crud.model.entity.SysRole;
import top.blackr.folivora.common.security.crud.model.vo.SysRoleVo;

import java.util.Set;

@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {

    /**
     * 根据用户id查询用户角色信息
     *
     * @param userId 用户id
     * @return 用户角色信息
     */
    Set<SysRoleVo> getRolesByUserId(@Param("userId") Long userId);
}
